/* Copyright 2011 Elektrobit Wireless Communications Oy (EB)


  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 2 as 
  published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


 *All rights reserved 
 *Version:Elektrobit_Qt_1.0.0_20110305 */


#ifndef IMAGEDATA_H
#define IMAGEDATA_H

#include <QObject>
#include <qdeclarative.h>
class ImageData;

void imageDatasPropClear(QDeclarativeListProperty<ImageData>* prop);
void imageDatasPropAppend(QDeclarativeListProperty<ImageData>* prop, ImageData* value);
int imageDatasPropCount(QDeclarativeListProperty<ImageData>* prop);
ImageData* imageDatasPropAt(QDeclarativeListProperty<ImageData>* prop, int index);


class ImageData : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    Q_PROPERTY(QString indexImage READ indexImage WRITE setIndexImage NOTIFY indexImageChanged)
    Q_PROPERTY(QString id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QString selectImage READ selectImage WRITE setSelectImage NOTIFY selectImageChanged)

public:
    ImageData(QObject *parent = 0);
    ImageData( QString &name,  QString &indexImage, QObject *parent=0);


    QString name() const;
    void setName(const QString &name);

    QString indexImage() const;
    void setIndexImage(const QString &indexImage);

    QString id()const;
    void setId(const QString & id);

    QString selectImage() const;
    void setSelectImage(const QString &selectImage);

public slots:
    void click(QString name);
signals:
    void nameChanged();
    void indexImageChanged();
    void idChanged();
    void selectImageChanged();
public slots:
private:
    QString m_id;
    QString m_name;
    QString m_indexImage;
    QString m_selectImage;


};

#endif // IMAGEDATA_H

